package com.movitech.mobile.cz.base.supplier.mapper.ext;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.movitech.mobile.cz.base.supplier.entity.SSuppliers;
import com.movitech.mobile.cz.base.supplier.entity.ext.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 供方基本情况 Mapper 接口
 * </p>
 *
 * @author Movitech Mobile
 * @since 2018-02-28
 */
@Component
@Mapper
public interface ExtSSuppliersMapper extends BaseMapper<ExtSSuppliers> {

    int updateSuppliersPassword(SuppliersUpdatePasswordRequestVO suppliersListRequestVO);

    int updateSuppliersStatic(SuppliersUpdateStaticRequestVO suppliersUpdateStaticRequestVO);

    Integer findSuppliersListCount(Map<String, Object> map);

    List<ExtSysUserResponseVO> findSuppliersList(Map<String, Object> map);

	long getSuppliersMulitListCounts(Map<String, Object> map);

	List<ExtSSuppliers> getSuppliersMulitList(Map<String, Object> map);

	long getSuppliersListCounts(Map<String, Object> map);

	List<ExtSSuppliers> getSuppliersList(Map<String, Object> map);

	int findSupplierCount(SSuppliers sSuppliers);

    long getSuppliersBlackListCounts(Map<String, Object> map);

    List<ExtSSuppliers> getSuppliersBlackList(Map<String, Object> map);

    SSuppliers getById(@Param("id") String id);

    ExtSSuppliers getByRelatedId(@Param("relatedId") String relatedId);


    public List<ExtSSuppliers> getCompanyListByStatus(@Param("supplierStatus")String supplierStatus,@Param("id")String id);

    ExtSSuppliers getExtById(@Param("id") String id);

    /**
     * 获取可供选择的供方
     * @param regionalCompanyId
     * @param purchaseClassification
     * @return
     */
	List<ExtSSuppliers> getSelectSupplierListByCompanyIdAndServiceCategoryIds(@Param("regionalCompanyId") String regionalCompanyId,@Param("purchaseClassification") String purchaseClassification);

    public List<ExtSSuppliers> getSuppliersAll(Map<String, Object> map);

    public Long getSuppliersAllCount(Map<String, Object> map);

    public List<ExtSSuppliers> getSuppliersByIdOrCode(Map<String, Object> map);

    Integer updateBaseInfoById(SSuppliers entity);

    List<SSuppliers> selectRankable(RankHistoryReqVO vo);

    String getByRelatedIdByWorkflowId(String bpmId);

    Integer getAbutmentSubTypeByWorkflowId(String bpmId);

    List<ExtSSuppliers> getUnSynSuppliersList();

    List<ExtSSuppliers> getSupplierListForSyncCost();
}
